class GetTripRouteData {
  RouteData routeData;
  Schedule schedule;

  GetTripRouteData({this.routeData, this.schedule});

  GetTripRouteData.fromJson(Map<String, dynamic> json) {
    routeData = json['route_data'] != null
        ? new RouteData.fromJson(json['route_data'])
        : null;
    schedule = json['schedule'] != null
        ? new Schedule.fromJson(json['schedule'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.routeData != null) {
      data['route_data'] = this.routeData.toJson();
    }
    if (this.schedule != null) {
      data['schedule'] = this.schedule.toJson();
    }
    return data;
  }
}

class RouteData {
  String id;
  String originProvince;
  String orginCity;
  String orginPoint;
  String endProvince;
  String endCity;
  String endPoint;
  String unitPrice;

  RouteData(
      {this.id,
      this.originProvince,
      this.orginCity,
      this.orginPoint,
      this.endProvince,
      this.endCity,
      this.endPoint,
      this.unitPrice});

  RouteData.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    originProvince = json['origin_province'];
    orginCity = json['orgin_city'];
    orginPoint = json['orgin_point'];
    endProvince = json['end_province'];
    endCity = json['end_city'];
    endPoint = json['end_point'];
    unitPrice = json['unit_price'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['origin_province'] = this.originProvince;
    data['orgin_city'] = this.orginCity;
    data['orgin_point'] = this.orginPoint;
    data['end_province'] = this.endProvince;
    data['end_city'] = this.endCity;
    data['end_point'] = this.endPoint;
    data['unit_price'] = this.unitPrice;
    return data;
  }
}

class Schedule {
  num id;
  String routerId;
  String pickUpTime;
  String departureTime;
  String driverId;
  num seatNum;
  num passengerNum;
  num surplusNumber;

  Schedule(
      {this.id,
      this.routerId,
      this.pickUpTime,
      this.departureTime,
      this.driverId,
      this.seatNum,
      this.passengerNum,
      this.surplusNumber});

  Schedule.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    routerId = json['router_id'];
    pickUpTime = json['pick_up_time'];
    departureTime = json['departure_time'];
    driverId = json['driver_id'];
    seatNum = json['seat_num'];
    passengerNum = json['passenger_num'];
    surplusNumber = json['surplus_number'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['router_id'] = this.routerId;
    data['pick_up_time'] = this.pickUpTime;
    data['departure_time'] = this.departureTime;
    data['driver_id'] = this.driverId;
    data['seat_num'] = this.seatNum;
    data['passenger_num'] = this.passengerNum;
    data['surplus_number'] = this.surplusNumber;
    return data;
  }
}
